package com.landinfo.service.mapper;

import com.landinfo.domain.BookMark;
import com.landinfo.service.dto.BookMarkDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * Mapper for the entity BookMark and its DTO BookMarkDTO.
 */
@Mapper(componentModel = "spring", uses = {UserMapper.class, })
public interface BookMarkMapper {

    @Mapping(source = "user.id", target = "userId")
    BookMarkDTO bookMarkToBookMarkDTO(BookMark bookMark);

    List<BookMarkDTO> bookMarksToBookMarkDTOs(List<BookMark> bookMarks);

    @Mapping(source = "userId", target = "user")
    BookMark bookMarkDTOToBookMark(BookMarkDTO bookMarkDTO);

    List<BookMark> bookMarkDTOsToBookMarks(List<BookMarkDTO> bookMarkDTOs);
}
